package com.chuang.server.service;

import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.chuang.server.pojo.ResultBean;
import com.chuang.server.pojo.ResultPageBean;
import com.chuang.server.pojo.User;
import com.chuang.server.pojo.UserLoginParams;
import org.springframework.http.HttpRequest;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 用户表 服务类
 * </p>
 *
 * @author vicente
 * @since 2021-12-14
 */
public interface UserService extends IService<User> {
    List<Map<Object,Object>> selectAll();
    Map<Object,Object> selectUserById(int id);
    int addUser(User user);
    int delUserById(int id);

    ResultBean login(String username, String password);

    User getUserByName(String name);

    ResultBean register(JSONObject jsonObject);
    public ResultPageBean selectUserPage(Page<User> page, Integer state);
}
